void main() {
	// std transform
	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
	
	// get vertex normal
	vec3	N = normalize(gl_NormalMatrix * gl_Normal);
	
	// world coord of vertex
	vec4	V = gl_ModelViewMatrix * gl_Vertex;
	
	// vector from world vertex to light location
	vec3	L = normalize(gl_LightSource[0].position.xyz - V.xyz);
	
	// work out light intensity
	float	diffuseIntensity = max(0.0, dot(N, L));
	
	// multiply the colour by the light intensity 
	gl_FrontColor = gl_Color * vec4(diffuseIntensity);	
}